# 一.自定义异常类MyException类,测试当用户输入的数字大于90,raise主动抛出并处理该异常
class MyException(Exception):
    def __init__(self, number):
        self.number = number
    def __int__(self):
        return self.number

num = input('请输入您的成绩:')
num = int(num)
try:
    if num > 90:
        raise MyException('分数太高，疑似作弊！！！')
except MyException as e:
    print(e)
else:
    print('恭喜你成绩优秀，不要太骄傲哦！')

